-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed incorrect diff for num_clusters
and min_num_clusters
for stopped databricks_sql_endpoint
#1927
Conversation
Correctly suppress diff for `num_clusters` on warehouses that are not running, in case `num_clusters` is not specified. Note for contributors: `tf:"suppress_diff"` and `tf:"default"` don't work well together. Fix #1204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests are failing :-)
plus we need to do the same for MinNumClusers
.
Plus, maybe it makes sense to add .AtLeastOneOf
to num_clusers
and min_num_clusters
?
sql/resource_sql_endpoint.go
Outdated
@@ -27,7 +27,7 @@ type SQLEndpoint struct { | |||
AutoStopMinutes int `json:"auto_stop_mins" tf:"optional,default:120"` | |||
MinNumClusters int `json:"min_num_clusters,omitempty" tf:"default:1,suppress_diff"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do the same for MinNumClusters
?
num_clusters
for stopped databricks_sql_endpoint
num_clusters
and min_num_clusters
for stopped databricks_sql_endpoint
@alexott having a sound CI system makes me sometimes forget running tests locally. Added the same fix for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
# Version changelog ### 1.9.0 * Added [databricks_mws_credentials](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/mws_credentials) data source ([#1909](#1909)). * Fixed incorrect diff for `num_clusters` and `min_num_clusters` for stopped [databricks_sql_endpoint](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_endpoint) ([#1927](#1927)). * Fixed `privilege_assignment` in [databricks_sql_permissions](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_permissions) ([#1872](#1872)). * Documentation improvements ([#1921](#1921), [#1923](#1923)). Updated dependency versions: * Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 ([#1913](#1913)). * Bump google.golang.org/api from 0.105.0 to 0.106.0 ([#1914](#1914)).
# Version changelog ### 1.9.0 * Added [databricks_mws_credentials](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/mws_credentials) data source ([#1909](#1909)). * Fixed incorrect diff for `num_clusters` and `min_num_clusters` for stopped [databricks_sql_endpoint](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_endpoint) ([#1927](#1927)). * Fixed `privilege_assignment` in [databricks_sql_permissions](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_permissions) ([#1872](#1872)). * Documentation improvements ([#1921](#1921), [#1923](#1923)). Updated dependency versions: * Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 ([#1913](#1913)). * Bump google.golang.org/api from 0.105.0 to 0.106.0 ([#1914](#1914)).
…opped `databricks_sql_endpoint` (databricks#1927) Correctly suppress diff for `num_clusters` on warehouses that are not running, in case `num_clusters` is not specified. Note for contributors: `tf:"suppress_diff"` and `tf:"default"` don't work well together.
# Version changelog ### 1.9.0 * Added [databricks_mws_credentials](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/mws_credentials) data source ([databricks#1909](databricks#1909)). * Fixed incorrect diff for `num_clusters` and `min_num_clusters` for stopped [databricks_sql_endpoint](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_endpoint) ([databricks#1927](databricks#1927)). * Fixed `privilege_assignment` in [databricks_sql_permissions](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_permissions) ([databricks#1872](databricks#1872)). * Documentation improvements ([databricks#1921](databricks#1921), [databricks#1923](databricks#1923)). Updated dependency versions: * Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 ([databricks#1913](databricks#1913)). * Bump google.golang.org/api from 0.105.0 to 0.106.0 ([databricks#1914](databricks#1914)).
Correctly suppress diff for
num_clusters
on warehouses that are not running, in casenum_clusters
is not specified.Note for contributors:
tf:"suppress_diff"
andtf:"default"
don't work well together.Fixes #1204 #1743